﻿<%@ Control Language="c#" AutoEventWireup="false" Inherits="Web.Control.Member.Message.pm_show_message" %>
<input type="hidden" name="Rety" value="0" id="Rety" />
<input type="hidden" name="OP" value="0" id="OP" />
<div class="common">
	<div id="new_body">
		<div id="body_900">
			<div id="body_left"></div>
			<div id="body_main">
				<div class="title">
					<h1>
					<%if(flag=="in") { Response.Write(GetText("ML001"));}
                    else{Response.Write(GetText("ML002"));}%>
					</h1>
				</div>
				<div class="Center9001">
					<div class="Center9001Common">
						<div class="Center9001Content">
							<div class="readmail_area">
								<% if(mailModel != null) {%>
								<div class="readmail_top">
									<div class="readmail_top_left">
										<h3><%=Lx.Web.Common.UI.Globals.HtmlStrippedText(mailModel.PM_Tittle)%></h3>
										<span class="grey12"><%=GetText("ML203", new string[] { "<a href='" + WWWHost + "/" + mailModel.ToNo + ".htm' >" + HttpUtility.HtmlEncode(mailModel.ToNickName) + "</a>", "<a href='" + WWWHost + "/" + mailModel.FromNo + ".htm'>" + HttpUtility.HtmlEncode(mailModel.FromNickName) + "</a>" })%></span>
									</div>
									<div class="readmail_top_right">
									<%if (currentNo > 1) { %>
									<a href="#" onclick="OtherMail(1)" title="<%=GetText("WK133") %>"><img src="/Images/iconleft.gif" align="absmiddle" alt="<%=GetText("WK133") %>" border="0" /></a><%} %>									    &nbsp;<%=currentNo%> of <%=AllCount%>&nbsp;<%if (currentNo < AllCount) {%><a href="#" onclick="OtherMail(2)" title="<%=GetText("TP103") %>"><img src="/Images/iconright.gif" align="absmiddle" alt="<%=GetText("TP103") %>" border="0" /></a><%} %>
									</div>
									<div class="clear"></div>
								</div>	
								<div class="readmail_list_reply">
									<div class="readmail_list_reply_pic"><div class="pic50" style="margin:0 auto; width:50px"><a href="<%=WWWHost%>/<%=mailModel.FromNo %>.htm" class="photo_50" title="<%=HttpUtility.HtmlAttributeEncode(mailModel.FromNickName) %>"><img src="<%=mailModel.FromAvatar==""?"/Images/no_pic.gif":mailModel.FromAvatar%>" /></a></div></div>
									<div class="readmail_list_reply_name">
										<a href='<%=WWWHost%>/<%=mailModel.FromNo %>.htm' ><%=mailModel.FromNickName %></a><br /><span class="grey10"><%=FormatDiffDate(GetText("C0036"), mailModel.DiffLastUpdate)%></span></div>
									<div class="readmail_list_reply_con"><p><%=EncodeMessage(mailModel.PM_Message)%></p></div>
									<div class="clear"></div>
								</div>
								<div id="ReplyMailID">
								    <asp:Repeater ID="repeatReply" runat="server">								
								    <ItemTemplate>
								    <div class="readmail_list_reply">
									    <div class="readmail_list_reply_pic"><div class="pic50" style="margin:0 auto; width:50px"><a href="/<%#Eval("Creator") %>.htm" class="photo_50" title="<%#HttpUtility.HtmlAttributeEncode(Eval( "NickName").ToString())%>"><img src="<%# Eval( "Avatar").ToString()==""?"/Images/no_pic.gif":Eval( "Avatar").ToString()%>" /></a></div></div>
									    <div class="readmail_list_reply_name"><a href="/<%#Eval("Creator") %>.htm"><%# HttpUtility.HtmlEncode(Eval("NickName").ToString())%></a><br /><span class="grey10"><%#FormatDiffDate(GetText("C0036"), Eval("DiffLastUpdate").ToString())%></span></div>
									    <div class="readmail_list_reply_con"><p><%#Lx.Web.Common.UI.Globals.HtmlStrippedText(Eval("ReplyBody").ToString()).Replace("\n", "<br/>")%></p></div>
									    <div class="clear"></div>
								    </div>
								    </ItemTemplate>								
								    </asp:Repeater>
								</div>
								<% } %>
								<div style="text-align:right"><a href="javascript:;" onclick="javascript:DeleteMessage(<%= mailModel.PM_ID %>,MemberNo);"><%=GetText("C0050")%></a></div>
								<div id="CommentContent" style="margin-left:220px"><a name="reply" id="reply"></a>
									<h3><%=GetText("C0065")%></h3>
									<p><textarea id="texta_body" style="width:680px" rows="5"></textarea><span id="valContent" style="color:Red;display:none"><br /><%=GetText("ST155",new string[]{"1","2000"}) %></span></p>									
									<p><input type="button" value="<%=GetText("C0045")%>" class="button" <%=(((Lx.Web.Common.UI.TDTPageBase)Page).IsAffirm)?"onclick=\"javascript:ReplyMessage(MemberNo,'"+mailModel.PM_ID+"','');\"":"onclick=\"NotAffirm()\""%>/></p>
								</div>
								<!--reply-->
							</div>
						</div>
					</div>
				</div>
			</div>
			<div id="body_right"></div>
			<div class="clear"></div>
		</div>
		<div id="body_900F"></div>
	</div>
</div>
<div id="ReplyMailTemp" style="display:none">    
    <div class="readmail_list_reply">
	    <div class="readmail_list_reply_pic"><div class="pic50" style="margin:0 auto; width:50px"><a href="/<%=mailModel.ToNo %>.htm" class="photo_50" title="$NickName$">$Avatar$</a></div></div>
	    <div class="readmail_list_reply_name"><a href="/<%=mailModel.ToNo %>.htm">$NickName$</a><br /><span class="grey10">$DiffLastUpdate$</span></div>
	    <div class="readmail_list_reply_con"><p>$ReplyBody$</p></div>
	    <div class="clear"></div>
    </div>   
</div>
<script type="text/javascript">
var gDateFormat = "<%=GetText("C0033")%>";
var gStrDate2 = "<%=GetText("C0036")%>";
	var MemberNo="<%=MemberNo %>";
	var currID="<%=mailModel.PM_ID %>";
	var AllCount=<%=AllCount %>;
	var currentNo=<%=currentNo %>;
	var flag="<%=flag %>";
	var C1008="<%=GetText("C1008") %>";
    var C0069 = '<%=GetText("C0069")%>';
    var gCancel = "<%=GetText("C0056")%>";
</script>